<template>
  <div></div>
  <span>绑定key</span>
<!--按照顺序用key来绑定顺序-->
  <p v-for="(item,index) of result" v-bind:key="item.shopId">{{item.title}}</p>
</template>

<script>
export default {
  name: "KeyDemo",
  data(){
    return{
      result: [
        { "shopId":2,
          "title":"100代金券",
          "subTitle":"通用",
          "rules":"通用",
          "payValue":8000,
          "actualValue":10000,
          "type":1,
          "stock":100},
        {
          "shopId":3,
          "title":"300代金券",
          "subTitle":"通用",
          "rules":"通用",
          "payValue":8000,
          "actualValue":10000,
          "type":1,
          "stock":100,
          "img":"https://t7.baidu.com/it/u=1595072465,3644073269&fm=193&f=GIF"
        },
        {
          "shopId":1,
          "title":"10代金券",
          "subTitle":"通用",
          "rules":"通用",
          "payValue":8000,
          "actualValue":10000,
          "type":1,
          "stock":100,
          "img":"https://t7.baidu.com/it/u=1595072465,3644073269&fm=193&f=GIF"
        }]
    }
  }
}
</script>

<style scoped>

</style>
